package com.mtons.mblog.web.controller.site;

import com.mtons.mblog.modules.service.MusicService;
import com.mtons.mblog.web.controller.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * 音乐.
 * @author yuzhong
 * @date 2019/2/28 19:18
 */
@Controller
public class MusicController extends BaseController {
    @Autowired
    private MusicService musicService;

    /**
     * 查询所有音乐列表
     * @return
     */
    @GetMapping("/music")
    public String view(ModelMap model) {
        model.put("musics", musicService.findALL());
        return view(Views.MUSIC);
    }


}
